package com.wdy.visitor;

/**
 * @ClassName: Hayes
 * @Description: TODO
 * @Date: 2019/12/30 14:17
 * @Author: wangdy001
 * @Version: 1.0
 */
public class Hayes implements Modem {
    @Override
    public void accept(ModemVisitor visitor) {
        if(visitor instanceof HayesVisitor) {
            ((HayesVisitor)visitor).visit(this);
        } else {
            System.out.println(visitor.toString() + "is not allowed to visit " + this.toString());
        }
    }

    @Override
    public String toString() {
        return "Hayes{}";
    }
}
